Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pkcs12 tests for wolfcrypt #7502

Closed
wants to merge 5 commits into from

Conversation

ColtonWilley
Copy link
Contributor

Existing PKCS12 tests in test.c are really for the PKCS12 password based KDF functionality in pwdbased.c, so those have been renamed pcks12_kdf tests and a new function with the same symbol name now tests the APIs in pkcs12.h. Function wc_PKCS12_parse() yields an allocated WC_DerCertList structure, so I added a new publicly exposed associated free function, the existing wc_FreeCertList() is local and does not follow naming conventions, so I added a public wrapper for it. Stack sizes for certs are no larger than the ones used in the existing kyber tests.

Copy link
Contributor

@dgarske dgarske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

wolfcrypt/test/test.c Show resolved Hide resolved
wolfcrypt/test/test.c Show resolved Hide resolved
wolfcrypt/test/test.c Show resolved Hide resolved
wolfcrypt/test/test.c Show resolved Hide resolved
wolfcrypt/src/pkcs12.c Outdated Show resolved Hide resolved
@dgarske
Copy link
Contributor

dgarske commented May 3, 2024

Test with WOLFSSL_NO_MALLOC fails:

PKCS12   test failed!
 error L=24872

wolfcrypt/src/pkcs12.c Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants